const express = require("express");
const router = express.Router();

const {
  list,
  details,
  add,
  del,
  update,
  all,
} = require("../../controllers/learn/categoriesController");

/**
 * 分页列表
 * GTE  /Categories/list
 */
router.get("/list", list);

/**
 * 所有
 * GET /Categories/all
 */
router.get("/all", all);

/**
 * 查询
 * GET /Categories/details
 */
router.get("/details", details);

/**
 * 新增
 * POST /Categories/add
 */
router.post("/add", add);

/**
 * 删除
 * DELETE /Categories/delete
 */
router.delete("/delete", del);

/**
 * 更新
 * PUT /Categories/update
 */
router.put("/update", update);

module.exports = router;
